﻿package mortal.game.view.market.alert
{
    import com.mui.controls.*;
    import com.mui.core.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;
    import mortal.game.view.common.alertwins.*;

    public class MktTodayNoTipAlert extends CheckBoxWin
    {
        private var _moneyIcon:GBitmap;
        private var _txt:GTextFiled;
        public var data:Object;

        public function MktTodayNoTipAlert(param1:Number, param2:Number)
        {
            super(param1, param2);
            return;
        }// end function

        private function updateViewByData() : void
        {
            this.data = Alert.extendObj;
            this._moneyIcon.bitmapData = GlobalClass.getBitmapData(GameDefConfig.instance.getEPrictUnitImg(this.data.unit));
            this._txt.text = this.data.str;
            return;
        }// end function

        override protected function layoutAllUI() : void
        {
            super.layoutAllUI();
            prompt.addChild(this._moneyIcon);
            prompt.addChild(this._txt);
            this.updateViewByData();
            return;
        }// end function

        override protected function writeData() : void
        {
            super.writeData();
            this.updateViewByData();
            return;
        }// end function

        override protected function createChildren() : void
        {
            super.createChildren();
            this._moneyIcon = UIFactory.gBitmap("", 128, 146);
            this._txt = UIFactory.textField("", 147, 145, 40, 20);
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._moneyIcon = null;
            this._txt = null;
            return;
        }// end function

    }
}
